<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>官方客服 - 百货购物平台</title>
    <link href="https://cdn.jsdelivr.net/npm/layui@2.9.20/dist/css/layui.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
        }

        body {
            background-color: #fafafa;
        }

        /* 顶部导航栏 - 粉色风格 */
        .header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(135deg, #ffecef 0%, #fff0f3 100%);
            padding: 0 40px;
            box-shadow: 0 4px 20px rgba(255, 156, 176, 0.15);
            position: relative;
            z-index: 1000;
            height: 70px;
            border-bottom: 1px solid #ffdde4;
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 28px;
            font-weight: 800;
            color: #ff4d7a;
            text-shadow: 1px 1px 3px rgba(255, 77, 122, 0.2);
        }

        .logo i {
            margin-right: 10px;
            font-size: 32px;
        }

        .nav-menu {
            display: flex;
            list-style: none;
            height: 100%;
        }

        .nav-menu li {
            display: flex;
            align-items: center;
            position: relative;
            padding: 0 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            height: 100%;
        }

        .nav-menu li a {
            text-decoration: none;
            color: #ff4d7a;
            font-size: 16px;
            font-weight: 600;
            display: flex;
            align-items: center;
            height: 100%;
            padding: 0 5px;
            transition: all 0.3s;
        }

        .nav-menu li a i {
            margin-right: 8px;
            font-size: 18px;
        }

        .nav-menu li:hover {
            background: rgba(255, 255, 255, 0.5);
        }

        .nav-menu li.active {
            background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
        }

        .nav-menu li.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(to right, #ff8da1, #ff4d7a);
            border-radius: 3px 3px 0 0;
        }

        .nav-menu li.active a {
            color: #e6004c;
        }

        /* 搜索框样式 */
        .search-container {
            background-color: #fff;
            padding: 0;
            position: sticky;
            top: 0;
            z-index: 999;
            box-shadow: 0 2px 15px rgba(0,0,0,0.05);
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 90px;
        }

        .search-box {
            width: 700px;
            margin: 0 auto;
            display: flex;
            border: 2px solid #ff4d7a;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(255, 77, 122, 0.2);
            height: 52px;
        }

        .search-select {
            padding: 0 15px;
            background: #fff;
            border: none;
            border-right: 1px solid #eee;
            outline: none;
            color: #ff4d7a;
            font-weight: 500;
            width: 130px;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff4d7a' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            background-size: 16px;
            cursor: pointer;
        }

        .search-select:focus {
            background-color: #fff9fb;
        }

        .search-input-container {
            flex: 1;
            display: flex;
            align-items: center;
            position: relative;
        }

        .search-input {
            flex: 1;
            border: none;
            padding: 0 20px 0 45px;
            font-size: 16px;
            outline: none;
            color: #333;
            height: 100%;
        }

        .search-icon {
            position: absolute;
            left: 15px;
            color: #999;
            font-size: 18px;
        }

        .search-button {
            background: linear-gradient(135deg, #ff4d7a 0%, #ff8da1 100%);
            color: white;
            border: none;
            padding: 0 35px;
            font-size: 17px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .search-button:hover {
            background: linear-gradient(135deg, #ff3366 0%, #ff7799 100%);
        }

        /* 内容容器 */
        .content-container {
            max-width: 1200px;
            margin: 40px auto;
            padding: 0 20px;
        }

        .section-title {
            position: relative;
            font-size: 26px;
            margin: 35px 0 25px;
            padding-left: 15px;
            color: #ff4d7a;
            font-weight: 700;
        }

        .section-title::before {
            content: '';
            position: absolute;
            left: 0;
            top: 8px;
            bottom: 8px;
            width: 5px;
            background: linear-gradient(to bottom, #ff8da1, #ff4d7a);
            border-radius: 5px;
        }

        /* 客服模块样式 */
        .customer-service-container {
            display: flex;
            flex-wrap: wrap;
            gap: 25px;
            margin-bottom: 40px;
        }

        .service-card {
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(255, 141, 161, 0.15);
            padding: 30px;
            transition: all 0.3s;
            flex: 1;
            min-width: 300px;
        }

        .service-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(255, 141, 161, 0.25);
        }

        .service-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }

        .service-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #ffedf0 0%, #fff9fb 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
        }

        .service-icon i {
            font-size: 28px;
            color: #ff4d7a;
        }

        .service-title {
            font-size: 22px;
            font-weight: 700;
            color: #ff4d7a;
        }

        .service-content {
            padding-left: 10px;
        }

        .service-content p {
            color: #666;
            line-height: 1.8;
            margin-bottom: 20px;
        }

        .contact-methods {
            list-style: none;
            margin-top: 20px;
        }

        .contact-methods li {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .contact-methods li:last-child {
            border-bottom: none;
        }

        .contact-methods i {
            width: 30px;
            font-size: 20px;
            color: #ff4d7a;
        }

        .contact-methods span {
            font-size: 16px;
            color: #333;
        }

        .contact-methods a {
            color: #ff4d7a;
            text-decoration: none;
            font-weight: 600;
        }

        .contact-methods a:hover {
            text-decoration: underline;
        }

        .faq-list {
            list-style: none;
        }

        .faq-item {
            margin-bottom: 15px;
            border: 1px solid #f0f0f0;
            border-radius: 10px;
            overflow: hidden;
        }

        .faq-question {
            background: #fff9fb;
            padding: 15px 20px;
            font-size: 18px;
            font-weight: 600;
            color: #ff4d7a;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .faq-answer {
            padding: 20px;
            background: #fff;
            color: #555;
            line-height: 1.7;
            display: none;
        }

        .faq-item.active .faq-answer {
            display: block;
        }

        .faq-item.active .faq-question i {
            transform: rotate(180deg);
        }

        .faq-question i {
            transition: transform 0.3s;
        }

        .online-chat {
            background: #fff9fb;
            border-radius: 12px;
            padding: 25px;
            margin-top: 30px;
        }

        .chat-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }

        .chat-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #ff8da1 0%, #ff4d7a 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
        }

        .chat-avatar i {
            font-size: 24px;
            color: white;
        }

        .chat-title {
            font-size: 22px;
            font-weight: 700;
            color: #ff4d7a;
        }

        .chat-status {
            display: flex;
            align-items: center;
            margin-top: 5px;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #52c41a;
            margin-right: 8px;
        }

        .status-text {
            color: #52c41a;
            font-weight: 500;
        }

        .chat-box {
            height: 300px;
            border: 1px solid #ffdde4;
            border-radius: 10px;
            padding: 15px;
            overflow-y: auto;
            margin-bottom: 15px;
            background: white;
        }

        .message {
            margin-bottom: 15px;
            max-width: 80%;
        }

        .message-content {
            padding: 12px 15px;
            border-radius: 18px;
            font-size: 14px;
            line-height: 1.5;
        }

        .customer-message {
            margin-left: auto;
        }

        .customer-message .message-content {
            background: linear-gradient(135deg, #ff4d7a 0%, #ff8da1 100%);
            color: white;
            border-top-right-radius: 5px;
        }

        .service-message {
            margin-right: auto;
        }

        .service-message .message-content {
            background: #f0f0f0;
            color: #333;
            border-top-left-radius: 5px;
        }

        .chat-input {
            display: flex;
            gap: 10px;
        }

        .chat-input input {
            flex: 1;
            padding: 12px 15px;
            border: 1px solid #ffdde4;
            border-radius: 8px;
            font-size: 15px;
        }

        .chat-input button {
            background: linear-gradient(135deg, #ff4d7a 0%, #ff8da1 100%);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 0 25px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .chat-input button:hover {
            background: linear-gradient(135deg, #ff3366 0%, #ff7799 100%);
        }

        /* 页脚样式 */
        .footer {
            background: linear-gradient(135deg, #343a40 0%, #23272b 100%);
            color: #fff;
            padding: 50px 0 30px;
            margin-top: 70px;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 35px;
            padding: 0 20px;
        }

        .footer-column h3 {
            font-size: 20px;
            margin-bottom: 22px;
            padding-bottom: 12px;
            border-bottom: 2px solid #ff4d7a;
            color: #fff;
        }

        .footer-column ul {
            list-style: none;
        }

        .footer-column li {
            margin-bottom: 14px;
        }

        .footer-column a {
            color: #ddd;
            text-decoration: none;
            transition: all 0.3s;
            display: flex;
            align-items: center;
        }

        .footer-column a i {
            margin-right: 8px;
            color: #ff8da1;
        }

        .footer-column a:hover {
            color: #ff8da1;
            transform: translateX(5px);
        }

        .copyright {
            text-align: center;
            padding-top: 40px;
            margin-top: 40px;
            border-top: 1px solid #444;
            color: #aaa;
            font-size: 14px;
            max-width: 1200px;
            margin: 40px auto 0;
        }

        /* 响应式调整 */
        @media (max-width: 992px) {
            .footer-content {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .header-container {
                flex-direction: column;
                height: auto;
                padding: 15px;
            }

            .nav-menu {
                width: 100%;
                margin-top: 15px;
                justify-content: center;
            }

            .nav-menu li {
                padding: 10px 15px;
            }

            .search-box {
                width: 90%;
            }

            .service-card {
                min-width: 100%;
            }
        }

        @media (max-width: 576px) {
            .nav-menu {
                flex-wrap: wrap;
            }

            .nav-menu li {
                padding: 8px 12px;
            }

            .search-box {
                flex-direction: column;
                border-radius: 15px;
                height: auto;
            }

            .search-select {
                width: 100%;
                padding: 12px 20px;
                border-right: none;
                border-bottom: 1px solid #eee;
                height: 50px;
            }

            .search-input-container {
                width: 100%;
            }

            .search-input {
                padding: 12px 20px 12px 45px;
                height: 50px;
            }

            .search-icon {
                left: 20px;
            }

            .search-button {
                padding: 15px;
                height: 50px;
            }

            .footer-content {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>
<body>
<!-- 顶部导航栏 -->
<div class="header-container">
    <div class="logo">
        <i class="fas fa-shopping-bag"></i>
        <span>百货购物平台</span>
    </div>
    <ul class="nav-menu">
        <li>
            <a href="index.html"><i class="fas fa-home"></i> 首页</a>
        </li>
        <li>
            <a href="cart%20item.html"><i class="fas fa-shopping-cart"></i> 购物车</a>
        </li>
        <li >
            <a href="checkout.html"><i class="fas fa-cash-register"></i> 结算</a>
        </li>
        <li>
            <a href="order.html"><i class="fas fa-file-invoice"></i> 我的订单</a>
        </li>
        <li>
            <a href="person_center.html"><i class="fas fa-user-circle"></i> 个人中心</a>
        </li>
        <li class="active">
            <a href="customer_service.html"><i class="fas fa-headset"></i> 官方客服</a>
        </li>
    </ul>
</div>

<!-- 搜索框 -->
<div class="search-container">
    <div class="search-box">

        <div class="search-input-container">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="输入您的问题关键词...">
        </div>
        <button class="search-button">搜索</button>
    </div>
</div>

<!-- 内容容器 -->
<div class="content-container">
    <h2 class="section-title">官方客服</h2>

    <div class="customer-service-container">
        <!-- 联系方式卡片 -->
        <div class="service-card">
            <div class="service-header">
                <div class="service-icon">
                    <i class="fas fa-phone-alt"></i>
                </div>
                <div class="service-title">联系我们</div>
            </div>
            <div class="service-content">
                <p>我们提供多种联系方式，方便您随时与我们取得联系。</p>
                <ul class="contact-methods">
                    <li>
                        <i class="fas fa-phone"></i>
                        <span>客服热线：<a href="tel:4001234567">400-123-4567</a>（24小时）</span>
                    </li>
                    <li>
                        <i class="fas fa-envelope"></i>
                        <span>客服邮箱：<a href="mailto:service@baihuo.com">service@baihuo.com</a></span>
                    </li>
                    <li>
                        <i class="fas fa-comments"></i>
                        <span>在线客服：周一至周日 8:00-22:00</span>
                    </li>
                    <li>
                        <i class="fas fa-map-marker-alt"></i>
                        <span>公司地址：厦门市集美大道99号</span>
                    </li>
                </ul>
            </div>
        </div>

        <!-- 常见问题卡片 -->
        <div class="service-card">
            <div class="service-header">
                <div class="service-icon">
                    <i class="fas fa-question-circle"></i>
                </div>
                <div class="service-title">常见问题</div>
            </div>
            <div class="service-content">
                <p>以下是一些用户经常遇到的问题，或许能帮助您快速找到答案。</p>
                <ul class="faq-list">
                    <li class="faq-item">
                        <div class="faq-question">
                            <span>如何查询订单物流信息？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            您可以在"我的订单"页面查看订单详情，点击"查看物流"按钮即可查询最新物流信息。
                        </div>
                    </li>
                    <li class="faq-item">
                        <div class="faq-question">
                            <span>如何申请退换货？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            在"我的订单"页面选择需要退换的商品，点击"申请售后"，按照提示填写相关信息并提交申请。
                        </div>
                    </li>
                    <li class="faq-item">
                        <div class="faq-question">
                            <span>商品价格保护政策是什么？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            自订单完成之日起7天内，如商品价格下降，可申请价格保护，我们将退还差价。
                        </div>
                    </li>
                    <li class="faq-item">
                        <div class="faq-question">
                            <span>如何修改收货地址？</span>
                            <i class="fas fa-chevron-down"></i>
                        </div>
                        <div class="faq-answer">
                            在"个人中心"的"收货地址"页面，您可以添加、编辑或删除收货地址。
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/layui@2.9.20/dist/layui.min.js"></script>
<script>
    // 初始化页面
    document.addEventListener('DOMContentLoaded', function() {
        // 常见问题展开/收起
        const faqQuestions = document.querySelectorAll('.faq-question');
        faqQuestions.forEach(question => {
            question.addEventListener('click', function() {
                const faqItem = this.parentNode;
                faqItem.classList.toggle('active');
            });
        });

        // 在线客服功能
        const chatBox = document.getElementById('chatBox');
        const messageInput = document.getElementById('messageInput');
        const sendBtn = document.getElementById('sendBtn');

        // 发送消息
        function sendMessage() {
            const message = messageInput.value.trim();
            if (message) {
                // 添加用户消息
                const userMessage = document.createElement('div');
                userMessage.className = 'message customer-message';
                userMessage.innerHTML = `<div class="message-content">${message}</div>`;
                chatBox.appendChild(userMessage);

                // 清空输入框
                messageInput.value = '';

                // 滚动到底部
                chatBox.scrollTop = chatBox.scrollHeight;

                // 模拟客服回复
                setTimeout(() => {
                    const responses = [
                        "感谢您的咨询，我们会尽快为您处理。",
                        "已了解您的问题，正在为您查询解决方案。",
                        "您的问题已记录，我们的客服专员将在1小时内联系您。",
                        "为了更好的解决您的问题，能否提供更多细节信息？"
                    ];

                    const randomResponse = responses[Math.floor(Math.random() * responses.length)];

                    const serviceMessage = document.createElement('div');
                    serviceMessage.className = 'message service-message';
                    serviceMessage.innerHTML = `<div class="message-content">${randomResponse}</div>`;
                    chatBox.appendChild(serviceMessage);

                    // 滚动到底部
                    chatBox.scrollTop = chatBox.scrollHeight;
                }, 1000);
            }
        }

        // 发送按钮点击事件
        sendBtn.addEventListener('click', sendMessage);

        // 输入框回车事件
        messageInput.addEventListener('keypress', function(e) {
            if (e.key === 'Enter') {
                sendMessage();
            }
        });

        // 设置导航菜单激活状态
        document.querySelectorAll('.nav-menu li').forEach(item => {
            item.addEventListener('click', function() {
                document.querySelectorAll('.nav-menu li').forEach(i => {
                    i.classList.remove('active');
                });
                this.classList.add('active');
            });
        });
    });
</script>
</body>
</html>